<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<title>51微贷</title>
		<link rel="stylesheet" type="text/css" href="../css/reset.css">
		<link rel="stylesheet" type="text/css" href="../css/common.css">
		<link rel="stylesheet" type="text/css" href="../css/icomoon/style.css">
		<script type="text/javascript" src="../js/rem.js"></script>
	</head>
	<body>
		<div class="m-common m-password">
			<h3 class="header f-pr">
				<span>邮箱验证</span>
				<i class="icon-angle-left f-pa"></i>
			</h3>
			<p class="tips-1">请绑定邮箱</p>
			<ul>
				<li>
					<label>邮箱</label>
					<input type="email" class="email" placeholder="请输入您的邮箱">
				</li>
			</ul>
			<div class="email-suffix clearfix">
				<a class="suffix">@qq.com</a>
				<a class="suffix">@163.com</a>
				<a class="suffix">@126.com</a>
				<a class="suffix">@sohu.com</a>
				<a class="suffix">@sina.com</a>
				<a class="suffix">@gmail.com</a>
			</div>
			<div class="btn-box">
				<a class="btn">下一步</a>
			</div>
		</div>

		<script type="text/javascript" src="../js/mui.min.js"></script>
		<script type="text/javascript" src="../js/zepto.min.js"></script>
		<script type="text/javascript" src="../js/common.js"></script>

		<script type="text/javascript">
			mui.plusReady(function(){
				function validate(){
					var email = $.trim($('.email').val());
					if(email == ''){
						mui.toast('请输入您的邮箱');
						return false;
					}
					return true;
				}

				$('.btn').on('tap', function(){
					var email=$.trim($('.email').val());
					if(email.length<=0){
						mui.toast('请输入您的邮箱');
						return false;
					}
					mui.ajax(base + 'account/sendemail', {
						type: 'post',
						data: {
							'user_id': parseInt(plus.storage.getItem('user_id')),
							'email': $.trim($('.email').val())
						},
						dataType: 'json',
						success: function(data){
							console.log(data);
							mui.toast(data.message);
						},
						error: function(data){
							console.error(data.message);
						}
					});
				});

				$('.icon-angle-left').on('tap', function(){
					mui.back();
				});
			});
		</script>
	</body>
</html>